/* 滚动条宽度 */
$scroll-bar-width: 6px;

@mixin clearfix {
  &::before{
    content: '';
    display: table;
  }
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: ' ';
    clear: both;
    height: 0;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    // background: #d3dce6;
    background: transparent;
  }

  &::-webkit-scrollbar {
    width: $scroll-bar-width;
  }

  &::-webkit-scrollbar-thumb {
    // background: #99a9bf;
    // background: transparent;
    background: rgba(144,147,153,.3);
    box-shadow: none;
    border-radius: 20px;
    transition: all ease 5s;
  }
  &:hover {
    &::-webkit-scrollbar-thumb {
      transition: all ease 5s;
      background: rgba(144,147,153,.5);
      // background: red;
    }
  }
}
// 美化 element-ui table 滚动条
@mixin tableScrollBar {
  &::-webkit-scrollbar-track-piece {
    background: transparent;
  }

  &::-webkit-scrollbar {
    width: $scroll-bar-width;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(144,147,153,.3);
    box-shadow: none;
    border-radius: 20px;
    transition: all ease 5s;
  }
  &:hover {
    &::-webkit-scrollbar-thumb {
      transition: all ease 5s;
      background: rgba(144,147,153,.5);
    }
  }
  &::-webkit-scrollbar {
    height: $scroll-bar-width;
    cursor: pointer;
  }
}
@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin fillover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
@mixin flexCenter {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
@mixin inlineflexCenter {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
@mixin boxshadow {
  background-color: #ffffff;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

@mixin textEllipsis{
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@mixin myPlaceholder {
  $input: &;
  @at-root {
    #{$input}::-webkit-input-placeholder {
      /* WebKit browsers */
      @content;
    }
    #{$input}:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      @content;
    }
    #{$input}::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      @content;
    }
    #{$input}:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      @content;
    }
  }
}
